﻿using RSModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RSFrame.Services
{
    public interface IAppointmentService
    {
        /// <summary>
        /// 添加订单数据
        /// </summary>
        /// <param name="appointment"></param>
        /// <returns>若添加成功，则返回订单ID；否则，返回null</returns>
        int? AddAppointmnet(Appointment appointment);

        /// <summary>
        /// 删除订单数据
        /// </summary>
        /// <param name="id">要删除订单的ID</param>
        /// <returns>若删除成功，则返回true；否则返回false</returns>
        bool DeleteAppointment(int id);

        /// <summary>
        /// 编辑订单信息
        /// </summary>
        /// <param name="id">要编辑的订单ID</param>
        /// <returns>若编辑成功，则返回true；否则返回false</returns>
        bool EditAppointment(int id);

        bool CompleteAppointment(int id);

        /// <summary>
        /// 获取订单数据
        /// </summary>
        /// <param name="id">要获取的订单ID</param>
        /// <returns>若获取成功，则返回订单实例；否则返回null</returns>
        Appointment GetAppointment(int id);

        List<Appointment> GetAppointmentsByUserID(int userID);

        /// <summary>
        /// 获取未处理的订单列表
        /// </summary>
        /// <returns>若获取成功，则返回订单列表；否则返回null</returns>
        List<Appointment> GetUnprocessedAppointments();
    }
}
